<?php echo use_stylesheet('backend/bookmarks') ?>
<?php $action = $object->isNew() ? 'Agregar' : 'Editar' ?>

<?php $route = $sf_user->getCurrentRouteName() ?>
<?php $function = $route != 'order_edit' ? sprintf('document.forms.%s.submit()', $sf_params->get('uClass')) : 'submitOrder("", "")' ?>

<table class="form" cellspacing="0" cellpadding="0" width="100%" align="center">
  <tr class="title" style="height: 25px;">
    <td class="title popup_dialog_header_left_right_padded" style="padding: 0px 1px 0px 5px;">
    </td>
  </tr>
  <tr style="height: 3px;">
    <td width="100%" class="popup_dialog_header_left_right_padded" style="background: #CED4DD;"></td>
  </tr>
  <tr>
    <td width="100%" style="padding: 0px 2px 0px 2px;">
      <table id="ProductBookmarksBlock" class="bookmarks" cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr>
          <td class="bookmark_active_left"><?php echo image_tag('bookmarks/bm-active-l.gif') ?></td>
          <td class="bookmark_active_icon"><?php echo image_tag('icons/c-details.gif') ?></td>
          <td class="bookmark_active_main">Detalles</td>
          <td class="bookmark_active_right"><?php echo image_tag('bookmarks/bm-active-r.gif') ?></td>
          <td width="100%" class="bookmarks_space">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="100%" style="padding: 0px 2px 0px 2px;">
      <table class="buttons_block" width="100%" cellpadding="4" cellspacing="0" style="border-left: solid 1px #2B7DC7; border-right: solid 1px #2B7DC7; border-bottom: solid 1px #2B7DC7; border-top-width: 0px; background-color: #9FBFE3;">
        <tr>
          <td width="90%"><?php echo $action?> <?php echo $titles ?></td>
          <td style="padding-right: 6px;">
	        <?php echo div_button_to_function
		               (
					     $object->isNew() ? 'Guardar' : 'Actualizar', 
						 $function, 
						 array('id' => 'btnSave1', 'class' => 'button button_6em')
					   )
		    ?>
          </td>
          <td style="padding-right: 9px;">
            <?php echo div_button_to
                       (
                         'Cancelar',
                         get_entrance_route(),
                         array('class' => 'button button_5em')
                       )
            ?>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
